Allbugs { var center define drawSnowflake using distance, count { loop { exit if count = 0 switch { case parity = 0 color red case parity = 1 color blue } parity = 1 - parity do drawJaggedLine(distance, 60 * count) count = count - 1 } } define drawJaggedLine using dist, dir { turnto dir switch { case dist < 8 move dist case 1 do drawJaggedLine(dist / 3, dir) do drawJaggedLine(dist / 3, dir + 60) do drawJaggedLine(dist / 3, dir - 60) do drawJaggedLine(dist / 3, dir) } return 0 } } Bug Sally { var parity, length initially { center = 50 length = 40 turn 0 // After this, 'center' must be 50 } x = 30 y = 15 do drawSnowflake(length, 6) } Bug Fred { var parity var length length = 30 x = start(length) y = 24 do drawSnowflake(length, 6) define start using w { turn 0 // Make sure Sally has set center = 50 return center - w / 2 } } Bug Linear { var stepSize stepSize = 1 angle = 0 x = -30 y = 50 color none loop { exit if x > 400 move stepSize } } Bug Follower1 { var stepSize, dir2, dirL y = 55 x = 10 turnto 90 stepSize = Linear.stepSize color green loop { dir2 = direction(Follower2) dirL = direction(Linear) angle = angle + (dir2 + 3 * dirL) / 40 move stepSize exit if x > 100 } } Bug Follower2 { var stepSize, dir1, dirL y = 45 x = 10 stepSize = 1 turnto 270 color orange loop { dir1 = direction(Follower1) dirL = direction(Linear) angle = angle + (dir1 + 3 * dirL) / 40 move stepSize exit if x > 100 } }